package cn.hxlc.tie.demo.core.error;

import cn.hxlc.tie.model.enums.exp.AbstractBaseException;

public enum MdmExceptionEnum implements AbstractBaseException {
    EXIST_ERROR(50001,"编号已存在"),
    ENABLED_ERROR(50002,"存在已启用数据"),
    GROUPHAS_ERROR(50003,"分组下存在数据"),
    PARENTDISABLED_ERROR(50004,"上级未启用"),
    CAVITY_ERROR(50005,"模穴错误"),
    MACHINE_ERRO(50006,"机台设备错误"),
    SHELFLIFE_EMPTY_ERROR(50007,"启用保质期后保质期及保质期单位不能为空！"),
    AUXPROPERTY_EMPTY_ERROR(50008,"启用辅助资料后辅助资料不能为空！"),
    BAN_ERROR(50009,"存在已禁用数据"),
    BASEUNIT_GROUP_ONLYONE(50010,"同组内只能有一个基本计量单位！"),
    FIXED_RATE_ERROR(50011,"固定换算类型换算率不能为空！"),
    FIXED_AUXUNIT_ERROR(50012,"固定换算类型辅助计量单位不能为空！"),
    FIXED_DIRECTION_ERROR(50013,"固定换算类型换算方向不能为空！"),
    UPARAM_NULL_ERROR(50014,"参数不能为空，请检查！"),
    INIT_ERROR(50015,"系统预设，不允许操作！"),
    SNUNIT_EMPTY_ERROR(50016,"启用序列号后序列号单位不能为空！"),
    SNUNIT_FIXED_ERROR(50016,"启用序列号且启用辅助计量，换算类型必须为固定换算！"),
    STATUS_ERROR(50017,"状态不合法"),
    NOTEXIST_ERROR(50018,"结果不存在！"),
    WARESITENOTEXIST_ERROR(50019,"不存在当前仓库、库区下！"),
    WAREAREANOTEXIST_ERROR(50020,"不存在当前仓库下！"),
    FROZEN_ERROR(50021,"已被冻结！"),
    NUMBER_EMPTY_ERROR(50022,"编码为空，请检查"),
    CHILDEXIST_ERROR(50023,"该分组存在子节点，删除失败"),
    EXIST_STATION_ERROR(50024,"该分组存在工位，删除失败"),
    EXIST_PRESON_ERROR(50025,"该班组存在班组已分配了班组人员，删除失败")
    ;

    MdmExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private Integer code;

    private String message;

    @Override
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
